import {store} from '@/store/index'

function iconType(){

    const iconType = {
        close: 'icon-word',
        open: 'icon-view-list'
    };

    
    const tableModel = store.state.carTableStore.toolsModel
    return iconType[tableModel]
}


// 表格模式切换
 const changeTableToolsModel:commonInf.toolsBarItem = {
    
    icon: 'icon-view-list',
    title: '模式切换',
    fn (type?:string){
        store.commit('carTableStore/setToolsModel', type)
        this.icon = iconType()
    }
}

export default changeTableToolsModel